package com.dq.text;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class demo1 {

	public static void main(String[] args) {
		//Object[] aa={"1","2","3","4","5","6","7","8"};
		//Object[] bb={"1","4","7"};
		String aa="RPT130,RPT1301,RPT13011,RPT13014,RPT13015,RPT13017,RPT1303,RPT13031,RPT13034,RPT13035,RPT13037,RPT1302,RPT13021,RPT13024,RPT13025,RPT13027,RPT1304,RPT13041,RPT13044,RPT13045,RPT13046,RPT13047,RPT1305,RPT13051,RPT13054,RPT13055,RPT13057,RPT1306,RPT13061,RPT110,RPT1101,RPT1104,RPT1105,RPT1107,RPT120,RPT1201,RPT1204,RPT1205,RPT1207,RPT160,RPT1601,RPT1604,RPT1605,RPT1607,RPT140,RPT1401,RPT1404,RPT1405,RPT1407";
		//RPT13015, RPT13017, RPT1303, RPT13031, RPT13034, RPT13035, RPT13037, RPT1302, RPT13021, RPT13024, RPT13025, RPT13027, RPT1304, RPT13041, RPT13044, RPT13045, RPT13046, RPT13047, RPT1305, RPT13051, RPT13054, RPT13055, RPT13057, RPT1306, RPT13061, RPT110, RPT1101, RPT1104, RPT1105, RPT1107, RPT120, RPT1201, RPT1204, RPT1205, RPT1207, RPT160, RPT1601, RPT1604, RPT1605, RPT1607, RPT140, RPT1401, RPT1404, RPT1405, RPT1407
		String bb="RPT130,RPT1301,RPT13011,RPT13014";
		Object [] cc=new demo1().deleteArrayElement(aa.split("\\,"), bb.split("\\,"));
		
		System.out.println(aa.split("\\,").length);
		System.out.println(bb.split("\\,").length);
		System.out.println(cc.length);
		for (int i = 0; i < cc.length; i++) {
			System.out.print(cc[i]+",");
		}
		
		
	}
	
	
	public static Object[] deleteArrayElement(Object[] string,Object[] temp){
		List list=Arrays.asList(string);
		List  l=new ArrayList();
		l.addAll(list);
		
		for (int i = 0; i < l.size(); i++) 
		{
			for (int j = 0; j < temp.length; j++) 
			{
				if(l.get(i).equals(temp[j].toString()))
				{
					l.remove(i);
				}
			}
			
		}		
		return l.toArray();
	}
}
